package storage

import (
	"github.com/jassue/go-storage/kodo"
	"github.com/jassue/go-storage/local"
	"github.com/jassue/go-storage/oss"
	"poem-server/initialize/config"
)

type StorageApp struct {
}

func NewStorageApp() StorageApp {
	return StorageApp{}
}
func (s StorageApp) Load() {
	if config.Config.Storage.Enable.LocalEnable {
		_, _ = local.Init(config.Config.Storage.Disks.Local)
	}
	if config.Config.Storage.Enable.QiNiuEnable {
		_, _ = kodo.Init(config.Config.Storage.Disks.QiNiu)
	}
	if config.Config.Storage.Enable.AliOssEnable {
		_, _ = oss.Init(config.Config.Storage.Disks.AliOss)
	}
}
